package Y2024.M11.D12;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 25228
 * Date: 2024-11-12
 * Time: 10:12
 */
public class Main {
    public static void main(String[] args) {
        MyQueue myQueue=new MyQueue();
        myQueue.put(1);
        myQueue.put(2);
        myQueue.put(3);
        myQueue.put(4);
        System.out.println(myQueue.get());
        System.out.println(myQueue.get());
        System.out.println(myQueue.get());
        System.out.println(myQueue.get());
    }
}




abstract class Collection{
abstract void put(Object o);
   abstract Object get();
}

class MyQueue extends Collection{
    Object[] array=new Object[100];
    int size=0;
    void put(Object o){
        array[size++]=o;
    }

    Object get(){
        Object s=array[0];
        size--;
        for (int i = 0; i < array.length-1; i++) {
            array[i]=array[i+1];
        }
        return s;
    }
}




interface CompareTo{

}



class Rectanqle{
    double _long;
    double _wide;
    Rectanqle(double _long,double _wide){
        this._long=_long;
        this._wide=_wide;
    }
    double getArea(){
        return _long*_wide;
    }
}

class Circle{
    double r;
    Circle(double r){
        this.r=r;
    }
    double getArea(){
        return Math.PI*r*r;
    }
}
